package thread;

import com.sun.org.apache.xml.internal.resolver.readers.TextCatalogReader;


public class Tread1 extends Thread {
    public void run(){
        while(true){
            System.out.println("执行Tread类的");
            try {
                Tread1.sleep(2000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
    public static void main(String[] args) throws InterruptedException {
      Tread1 t = new Tread1();
      t.start();
      t.join();
        System.out.println("执行main结束");
    }
}
